package com.tudou.player.videoPlayerModule
{
	import com.aspirin.frameworks.modulesConnector.core.Module;
	import com.aspirin.frameworks.modulesConnector.interfaces.ICommand;
	
	public class VideoPlayerModule extends Module
	{
		private static const NAME : String = "VideoPlayerModule";
		
		public function VideoPlayerModule( )
		{
			super( NAME );
		}
		
		override public function execute( command:ICommand ) : void
		{
			switch( command.name )
			{
				case VideoPlayerCommands.PLAY:
				trace("[PLAY]");
				break;
				
				case VideoPlayerCommands.PAUSE:
				trace("[PAUSE]");
				break;
				
				case VideoPlayerCommands.SEEK:
				trace("[SEEK]");
				break;
				
				case VideoPlayerCommands.SET_VOLUME:
				trace("[SET_VOLUME]");
				break;
			}
		}
		
		override public function onRegister() : void
		{
			registerCommands();
			
			installVideoPlayerController();
		}
		
		protected function registerCommands() : void
		{
			registerCommand( VideoPlayerCommands.PLAY );
			
			registerCommand( VideoPlayerCommands.PAUSE );
			
			registerCommand( VideoPlayerCommands.SEEK );
			
			registerCommand( VideoPlayerCommands.SET_VOLUME );
		}
		
		//----------------------------------------------------------------------------------
		private function installVideoPlayerController() : void
		{
			
		}
	}
}